package com.loans.request.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.loans.request.mapper.TbLoanMapper;
import com.loans.request.domain.TbLoan;
import com.loans.request.service.ITbLoanService;

/**
 * 贷款申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-13
 */
@Service
public class TbLoanServiceImpl implements ITbLoanService 
{
    @Autowired
    private TbLoanMapper tbLoanMapper;

    /**
     * 查询贷款申请
     * 
     * @param id 贷款申请主键
     * @return 贷款申请
     */
    @Override
    public TbLoan selectTbLoanById(Long id)
    {
        return tbLoanMapper.selectTbLoanById(id);
    }

    /**
     * 查询贷款申请列表
     * 
     * @param tbLoan 贷款申请
     * @return 贷款申请
     */
    @Override
    public List<TbLoan> selectTbLoanList(TbLoan tbLoan)
    {
        return tbLoanMapper.selectTbLoanList(tbLoan);
    }

    /**
     * 新增贷款申请
     * 
     * @param tbLoan 贷款申请
     * @return 结果
     */
    @Override
    public int insertTbLoan(TbLoan tbLoan)
    {
        return tbLoanMapper.insertTbLoan(tbLoan);
    }

    /**
     * 修改贷款申请
     * 
     * @param tbLoan 贷款申请
     * @return 结果
     */
    @Override
    public int updateTbLoan(TbLoan tbLoan)
    {
        return tbLoanMapper.updateTbLoan(tbLoan);
    }

    /**
     * 批量删除贷款申请
     * 
     * @param ids 需要删除的贷款申请主键
     * @return 结果
     */
    @Override
    public int deleteTbLoanByIds(Long[] ids)
    {
        return tbLoanMapper.deleteTbLoanByIds(ids);
    }

    /**
     * 删除贷款申请信息
     * 
     * @param id 贷款申请主键
     * @return 结果
     */
    @Override
    public int deleteTbLoanById(Long id)
    {
        return tbLoanMapper.deleteTbLoanById(id);
    }
}
